//
//  LGCiTangJiSiCollectionViewCell.m
//  ligenyun
//
//  Created by Mac on 2018/3/27.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "TMGGoldStoreCollectionViewCell.h"

@implementation TMGGoldStoreCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self configSubView];
        
    }
    return self;
}
+ (CGFloat)cellHeight{
    return photoItemWith + 65;
}
#pragma mark --subView
- (void)configSubView{
    self.backgroundColor = [UIColor whiteColor];
    [self st_setBorderWith:1 borderColor:[UIColor whiteColor] cornerRadius:4];
    self.iconButton = [[STButton alloc] initWithFrame:CGRectMake(0, 0, photoItemWith, photoItemWith)
                                                title:@""
                                           titleColor:nil
                                            titleFont:0
                                         cornerRadius:0
                                      backgroundColor:nil
                                      backgroundImage:[UIImage imageNamed:@"新手特权金banner"]
                                                image:nil];
    [self addSubview:self.iconButton];
    self.iconButton.userInteractionEnabled = NO;
    
    self.titleLable = [[STLabel alloc] initWithFrame:CGRectMake(5, self.iconButton.bottom, photoItemWith - 10, 35)
                                                text:@"贡酒dasdasda萨达所大所多大萨达撒多大大所多阿萨德as"
                                           textColor:FirstTextColor
                                                font:12
                                         isSizetoFit:NO
                                       textAlignment:NSTextAlignmentLeft];
    [self addSubview:self.titleLable];
    
    self.moneyLable = [[STLabel alloc] initWithFrame:CGRectMake(5, self.titleLable.bottom, photoItemWith - 10, 40)
                                                text:@"￥123123"
                                           textColor:TM_redColor
                                                font:13
                                         isSizetoFit:NO
                                       textAlignment:NSTextAlignmentLeft];
    [self addSubview:self.moneyLable];
}
- (void)setModel:(TMGStoreModel *)model{
    _model = model;
    self.titleLable.text = model.title;
    self.moneyLable.text = [NSString stringWithFormat:@"￥%@",model.money];
    [self.iconButton sd_setBackgroundImageWithURL:[NSURL URLWithString:model.picture_show] forState:UIControlStateNormal];
}
@end

